<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
		<title>Jasmine &mdash; Intype Documentation</title>
		<link rel="stylesheet" href="css/static.css" type="text/css" />
		<link rel="stylesheet" href="css/content.css" type="text/css" />
	</head>
	<body>
		<div id="page"><div id="page-inner">

			<div id="sub-header"><div id="sub-header-inner">
				&nbsp;
			</div></div>

			<div id="cols">

				<div id="nav">
					<div id="nav-inner">
						<h1>Manual</h1>
						<ul>
							<li><a href="introduction.html" class="title"><span>Introduction</span></a></li>
							<li><a href="editing.html" class="title"><span>Editing</span></a>
							<ul>
								<li><a href="selections.html" class="title"><span>Selections</span></a></li>
								<li><a href="find_and_replace.html" class="title"><span>Find & Replace</span></a></li>
							</ul>
							</li>
							<li><a href="preferences.html" class="title"><span>Preferences</span></a>
							<ul>
								<li><a href="appearance_preferences.html" class="title"><span>Appearance Preferences</span></a></li>
							</ul>
							</li>
							
							<li><a href="scopes.html" class="title"><span>Scopes</span></a>
							<ul>
								<li><a href="document_scopes.html" class="title"><span>Document Scopes</span></a></li>
								<li><a href="application_scopes.html" class="title"><span>Application Scopes</span></a></li>
								<li><a href="scope_selectors.html" class="title"><span>Scopes Selectors</span></a></li>
								<li><a href="scope_naming_conventions.html" class="title"><span>Naming Conventions</span></a></li>
							</ul>
							</li>
							
							<li><a href="bundles.html" class="title"><span>Bundles</span></a>
							<ul>
								<li><a href="bundle_items.html" class="title"><span>Bundle Items</span></a></li>
								<li><a href="scopes.html" class="title"><span>Scopes</span></a></li>
								<li><a href="snippets.html" class="title"><span>Snippets</span></a></li>
								<li><a href="languages.html" class="title"><span>Languages</span></a></li>
								<li><a href="built_in_bundles.html" class="title"><span>Built-In Bundles</span></a></li>
							</ul>
							</li>
							<li><span class="title missing"><span>appendix</span></span>
							<ul>
								<li><a href="jasmine.html" class="title"><span>Jasmine</span></a></li>
								<li><a href="regular_expressions.html" class="title"><span>Regular Expressions</span></a></li>
							</ul>
							</li>
						</ul>
					</div>
				</div>

				<div id="content">
					<div id="content-right">
						<div id="content-left">
							<div id="content-inner">
								<h1>Jasmine</h1>

<p>Jasmine is proprietary serialization format used by Intype. It's inspired by JavaScript, JSON and Apple's PropertList formats. In current version, Jasmine supports some aditional values and notation. Jasmine has been designed for easier configuration of Intype until UI's are not implemented to handle it for Jasmine. </p>

<p>Jasmine supports these basic value types:</p>

<ul>
<li>Strings</li>
<li>Symbols</li>
<li>Numbers</li>
<li>Arrays</li>
<li>Dictionaries</li>
<li>Regular Expressions</li>
</ul>

<h2>Strings</h2>

<p>There are two types of string notation: <strong>double-quoted</strong> and <strong>single-quoted</strong>. These types differ mostly in escaping, supporting two models: full escaping (for exact input), and loose (for easier input). Strings are basically multi-lined.</p>

<h3>Double-Quoted Strings</h3>

<p>Double-quoted strings is strict and supports all common escaping sequences:</p>

<table class="w">
    <thead>
        <tr>
            <th>Escape Sequence</th>
            <th>Description</th>
            <th>Unicode</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td class="c"><code>\"</code></td>
            <td>Quotation Mark</td>
            <td>U+0022</td>
        </tr>
        <tr>
            <td class="c"><code>\\</code></td>
            <td>Reversed Solidus</td>
            <td>U+005C</td>
        </tr>
        <tr>
            <td class="c"><code>\t</code></td>
            <td>Tab Character</td>
            <td>U+0009</td>
        </tr>
        <tr>
            <td class="c"><code>\n</code></td>
            <td>Line Ending (when the string is inserted into document, it's automatically tranformed to user preferences on how line's end in the document)</td>
            <td>U+000D U+000A (CR+LF)<br/>U+000A(LF)<br/>U+000D(CR)</td>
        </tr>
        <tr>
            <td class="c"><code>\uXXXX</code></td>
            <td>Unicode Character</td>
            <td>U+XXXX</td>
        </tr>
        <tr>
            <td colspan="3">
                Other escape sequences are not decoded, and are considered as normal two-character sequence.
            </td>
        </tr>
    </tbody>
</table>

<p>Examples:</p>

<pre><code>"String \"with escaped quotes\""
"\tString with tab character"
</code></pre>

<h3>Single-Quoted Strings</h3>

<p>Single-quoted strings are designed for easy textual input. They don't support any of the former escape sequences. There's only one sequence:</p>

<table class="w">
    <thead>
        <tr>
            <th>Escape Sequence</th>
            <th>Description</th>
            <th>Unicode</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td class="c"><code>''</code><br />double-appostrophe</td>
            <td>Apostrophe</td>
            <td>U+0027</td>
        </tr>
    </tbody>
</table>

<p>Examples:</p>

<pre><code>'String ''with escaped'' quotes'
'   String with tab character'
</code></pre>

<h3>String Operators</h3>

<p>There are two operators for concatenanting strings. <strong>Plus operator</strong> simply concatenates strings:</p>

<pre>
    "All your " + "base " + "are belong to " + 'us'

    <strong>==</strong> All your base are belong to us
</pre>

<p><strong>Plus-NewLine operator</strong> concatenates two strings, but inserts line-ending character between the strings.</p>

<pre>
    "All your " \ "base " \ "are belong to " \ 'us'

    <strong>==</strong> All your <strong class="h">\n</strong>base <strong class="h">\n</strong>are belong to <strong class="h">\n</strong>us
</pre>

<h2>Symbols</h2>

<p>Symbols are basically single-word strings, used mainly in dictionary as key-values. A symbol must be a sequence of characters specified in following table and <strong>if not used as dictionary key, symbol cannot start with number.</strong></p>

<table class="w">
    <thead>
        <tr>
            <th width="25%" class="c">Characters</th>
            <th>Note</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td class="c"><code>a-z</code><br/>U+0061 to U+007A</td>
            <td>Lowercase Letters</td>
        </tr>
        <tr>
            <td class="c"><code>A-Z</code><br/>U+0041 to U+005A</td>
            <td>Uppercase Letters</td>
        </tr>
        <tr>
            <td class="c"><code>0-9</code><br />U+0030 to U+0039</td>
            <td>Numbers</td>
        </tr>
        <tr>
            <td class="c"><code>_</code><br/>U+005F</td>
            <td>Underscore</td>
        </tr>
        <tr>
            <td class="c"><code>-</code><br />U+002D</td>
            <td>Hyphen</td>
        </tr>
        <tr>
            <td class="c"><code>.</code><br />U+002E</td>
            <td>Dot</td>
        </tr>
    </tbody>
</table>

<h2>Numbers</h2>

<p>Jasmine supports integers and floating numbers. All these notations are valid:</p>

<pre><code>12345
-12345
3.141592
1.618e+10
1.618E+10
</code></pre>

<h2>Arrays [...]</h2>

<p>Arrays are containers delimited in square parentheses. Array can contain any other value supported by Jasmine. Values don't need to be delimited by comma.</p>

<pre><code>[
    "One"
    2
    {
        four_key: Four
    }   
]
</code></pre>

<h2>Dictionaries {...}</h2>

<p>Dictionaries are asociative non-sorted containers delimited by curly parentheses. All values in dictionary have a key symbol assigned to them. Similar to arrays, values don't need to be delimited by comma.</p>

<pre><code>{
    one: "One"
    two: "Two"
    three: "Three"
}
</code></pre>

<p>Keys can also be numbers:</p>

<pre><code>{
    1: "One"
    2: "Two"
    3: "Three"
}
</code></pre>

<h2>Regular Expressions /.../</h2>

<p>In adition to standard set of values presented in other serializing languages, Jasmine supports regular expressions as a different type.</p>

<pre>
    / &laquo; <span class="h">regular expression</span> &raquo; / &laquo; <span class="h">options</span> &raquo;
</pre>

<p>Capabilities or regular expressions and options are set by application that implements Jasmine. Intype uses [Oniguruma][regular_expressions] library for all regular expressions. However, options and limitations may differ by implementation at different places. Specific parts of documentation note the limitations and options available.</p>

<h2>Future</h2>

<p>Jasmine is currently used in <em>Loose mode</em>, enabling easier input (commas not required, non-standard string operators, etc.). However, after Intype will have Bundle Editor it will be switched to <em>Strict mode</em>.</p>
							</div>
						</div>
					</div>
				</div>

			</div>

		</div>

		</div>
	</body>
</html>